<?php

namespace Keio\StudyBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Monhoc
 */
class Monhoc
{
    /**
     * @var integer
     */
    private $id;

    /**
     * @var string
     */
    private $name;

    /**
     * @var \Doctrine\Common\Collections\Collection
     */
    private $baihoc;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->baihoc = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Monhoc
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Add baihoc
     *
     * @param \Keio\StudyBundle\Entity\Baihoc $baihoc
     * @return Monhoc
     */
    public function addBaihoc(\Keio\StudyBundle\Entity\Baihoc $baihoc)
    {
        $this->baihoc[] = $baihoc;

        return $this;
    }

    /**
     * Remove baihoc
     *
     * @param \Keio\StudyBundle\Entity\Baihoc $baihoc
     */
    public function removeBaihoc(\Keio\StudyBundle\Entity\Baihoc $baihoc)
    {
        $this->baihoc->removeElement($baihoc);
    }

    /**
     * Get baihoc
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getBaihoc()
    {
        return $this->baihoc;
    }

    public function __toString()
	{
  		return $this->getName();
	}
    /**
     * @var \Doctrine\Common\Collections\Collection
     */
    private $cauhoi;


    /**
     * Add cauhoi
     *
     * @param \Keio\StudyBundle\Entity\Cauhoi $cauhoi
     * @return Monhoc
     */
    public function addCauhoi(\Keio\StudyBundle\Entity\Cauhoi $cauhoi)
    {
        $this->cauhoi[] = $cauhoi;

        return $this;
    }

    /**
     * Remove cauhoi
     *
     * @param \Keio\StudyBundle\Entity\Cauhoi $cauhoi
     */
    public function removeCauhoi(\Keio\StudyBundle\Entity\Cauhoi $cauhoi)
    {
        $this->cauhoi->removeElement($cauhoi);
    }

    /**
     * Get cauhoi
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCauhoi()
    {
        return $this->cauhoi;
    }

    //dành cho form để delete
    private $delform;
    public function setDelform($delform){
    	$this->delform = $delform;
    }
    public function getDelform(){
    	return $this->delform;
    }
}